package ink.yql.model;

import java.io.Serializable;

/**
 * @author YQL
 * 地址簿类
 */
public class AddressBook implements Serializable {
    /**
     *主键id
     */
    private Integer abid;
    /**
     *用户id
     */
    private Integer uid;
    /**
     * 地址簿名称
     */
    private String adname;
    /**
     * 收货人名称
     */
    private String aduserName;
    /**
     * 收货省份
     */
    private String adprovince;
    /**
     *  收货城市
     */
    private String adcity;
    /**
     * 详细地址
     */
    private String adaddress;
    /**
     * 邮编
     */
    private Integer adpostcode;
    /**
     * 收货人手机号
     */
    private String adphone;
    /**
     * 收货人邮箱
     */
    private String admailbox;
    /**
     * 是否是默认地址 0.是 1.否
     */
    private Integer addefault;

    public AddressBook(Integer abid, Integer uid, String adname, String aduserName, String adprovince, String adcity, String adaddress, Integer adpostcode, String adphone, String admailbox, Integer addefault) {
        this.abid = abid;
        this.uid = uid;
        this.adname = adname;
        this.aduserName = aduserName;
        this.adprovince = adprovince;
        this.adcity = adcity;
        this.adaddress = adaddress;
        this.adpostcode = adpostcode;
        this.adphone = adphone;
        this.admailbox = admailbox;
        this.addefault = addefault;
    }

    public AddressBook() {
    }

    public static AddressBookBuilder builder() {
        return new AddressBookBuilder();
    }

    public Integer getAbid() {
        return this.abid;
    }

    public Integer getUid() {
        return this.uid;
    }

    public String getAdname() {
        return this.adname;
    }

    public String getAduserName() {
        return this.aduserName;
    }

    public String getAdprovince() {
        return this.adprovince;
    }

    public String getAdcity() {
        return this.adcity;
    }

    public String getAdaddress() {
        return this.adaddress;
    }

    public Integer getAdpostcode() {
        return this.adpostcode;
    }

    public String getAdphone() {
        return this.adphone;
    }

    public String getAdmailbox() {
        return this.admailbox;
    }

    public Integer getAddefault() {
        return this.addefault;
    }

    public void setAbid(Integer abid) {
        this.abid = abid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public void setAdname(String adname) {
        this.adname = adname;
    }

    public void setAduserName(String aduserName) {
        this.aduserName = aduserName;
    }

    public void setAdprovince(String adprovince) {
        this.adprovince = adprovince;
    }

    public void setAdcity(String adcity) {
        this.adcity = adcity;
    }

    public void setAdaddress(String adaddress) {
        this.adaddress = adaddress;
    }

    public void setAdpostcode(Integer adpostcode) {
        this.adpostcode = adpostcode;
    }

    public void setAdphone(String adphone) {
        this.adphone = adphone;
    }

    public void setAdmailbox(String admailbox) {
        this.admailbox = admailbox;
    }

    public void setAddefault(Integer addefault) {
        this.addefault = addefault;
    }

    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof AddressBook)) return false;
        final AddressBook other = (AddressBook) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$abid = this.getAbid();
        final Object other$abid = other.getAbid();
        if (this$abid == null ? other$abid != null : !this$abid.equals(other$abid)) return false;
        final Object this$uid = this.getUid();
        final Object other$uid = other.getUid();
        if (this$uid == null ? other$uid != null : !this$uid.equals(other$uid)) return false;
        final Object this$adname = this.getAdname();
        final Object other$adname = other.getAdname();
        if (this$adname == null ? other$adname != null : !this$adname.equals(other$adname)) return false;
        final Object this$aduserName = this.getAduserName();
        final Object other$aduserName = other.getAduserName();
        if (this$aduserName == null ? other$aduserName != null : !this$aduserName.equals(other$aduserName))
            return false;
        final Object this$adprovince = this.getAdprovince();
        final Object other$adprovince = other.getAdprovince();
        if (this$adprovince == null ? other$adprovince != null : !this$adprovince.equals(other$adprovince))
            return false;
        final Object this$adcity = this.getAdcity();
        final Object other$adcity = other.getAdcity();
        if (this$adcity == null ? other$adcity != null : !this$adcity.equals(other$adcity)) return false;
        final Object this$adaddress = this.getAdaddress();
        final Object other$adaddress = other.getAdaddress();
        if (this$adaddress == null ? other$adaddress != null : !this$adaddress.equals(other$adaddress)) return false;
        final Object this$adpostcode = this.getAdpostcode();
        final Object other$adpostcode = other.getAdpostcode();
        if (this$adpostcode == null ? other$adpostcode != null : !this$adpostcode.equals(other$adpostcode))
            return false;
        final Object this$adphone = this.getAdphone();
        final Object other$adphone = other.getAdphone();
        if (this$adphone == null ? other$adphone != null : !this$adphone.equals(other$adphone)) return false;
        final Object this$admailbox = this.getAdmailbox();
        final Object other$admailbox = other.getAdmailbox();
        if (this$admailbox == null ? other$admailbox != null : !this$admailbox.equals(other$admailbox)) return false;
        final Object this$addefault = this.getAddefault();
        final Object other$addefault = other.getAddefault();
        if (this$addefault == null ? other$addefault != null : !this$addefault.equals(other$addefault)) return false;
        return true;
    }

    protected boolean canEqual(final Object other) {
        return other instanceof AddressBook;
    }

    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $abid = this.getAbid();
        result = result * PRIME + ($abid == null ? 43 : $abid.hashCode());
        final Object $uid = this.getUid();
        result = result * PRIME + ($uid == null ? 43 : $uid.hashCode());
        final Object $adname = this.getAdname();
        result = result * PRIME + ($adname == null ? 43 : $adname.hashCode());
        final Object $aduserName = this.getAduserName();
        result = result * PRIME + ($aduserName == null ? 43 : $aduserName.hashCode());
        final Object $adprovince = this.getAdprovince();
        result = result * PRIME + ($adprovince == null ? 43 : $adprovince.hashCode());
        final Object $adcity = this.getAdcity();
        result = result * PRIME + ($adcity == null ? 43 : $adcity.hashCode());
        final Object $adaddress = this.getAdaddress();
        result = result * PRIME + ($adaddress == null ? 43 : $adaddress.hashCode());
        final Object $adpostcode = this.getAdpostcode();
        result = result * PRIME + ($adpostcode == null ? 43 : $adpostcode.hashCode());
        final Object $adphone = this.getAdphone();
        result = result * PRIME + ($adphone == null ? 43 : $adphone.hashCode());
        final Object $admailbox = this.getAdmailbox();
        result = result * PRIME + ($admailbox == null ? 43 : $admailbox.hashCode());
        final Object $addefault = this.getAddefault();
        result = result * PRIME + ($addefault == null ? 43 : $addefault.hashCode());
        return result;
    }

    public String toString() {
        return "AddressBook(abid=" + this.getAbid() + ", uid=" + this.getUid() + ", adname=" + this.getAdname() + ", aduserName=" + this.getAduserName() + ", adprovince=" + this.getAdprovince() + ", adcity=" + this.getAdcity() + ", adaddress=" + this.getAdaddress() + ", adpostcode=" + this.getAdpostcode() + ", adphone=" + this.getAdphone() + ", admailbox=" + this.getAdmailbox() + ", addefault=" + this.getAddefault() + ")";
    }

    public static class AddressBookBuilder {
        private Integer abid;
        private Integer uid;
        private String adname;
        private String aduserName;
        private String adprovince;
        private String adcity;
        private String adaddress;
        private Integer adpostcode;
        private String adphone;
        private String admailbox;
        private Integer addefault;

        AddressBookBuilder() {
        }

        public AddressBook.AddressBookBuilder abid(Integer abid) {
            this.abid = abid;
            return this;
        }

        public AddressBook.AddressBookBuilder uid(Integer uid) {
            this.uid = uid;
            return this;
        }

        public AddressBook.AddressBookBuilder adname(String adname) {
            this.adname = adname;
            return this;
        }

        public AddressBook.AddressBookBuilder aduserName(String aduserName) {
            this.aduserName = aduserName;
            return this;
        }

        public AddressBook.AddressBookBuilder adprovince(String adprovince) {
            this.adprovince = adprovince;
            return this;
        }

        public AddressBook.AddressBookBuilder adcity(String adcity) {
            this.adcity = adcity;
            return this;
        }

        public AddressBook.AddressBookBuilder adaddress(String adaddress) {
            this.adaddress = adaddress;
            return this;
        }

        public AddressBook.AddressBookBuilder adpostcode(Integer adpostcode) {
            this.adpostcode = adpostcode;
            return this;
        }

        public AddressBook.AddressBookBuilder adphone(String adphone) {
            this.adphone = adphone;
            return this;
        }

        public AddressBook.AddressBookBuilder admailbox(String admailbox) {
            this.admailbox = admailbox;
            return this;
        }

        public AddressBook.AddressBookBuilder addefault(Integer addefault) {
            this.addefault = addefault;
            return this;
        }

        public AddressBook build() {
            return new AddressBook(abid, uid, adname, aduserName, adprovince, adcity, adaddress, adpostcode, adphone, admailbox, addefault);
        }

        public String toString() {
            return "AddressBook.AddressBookBuilder(abid=" + this.abid + ", uid=" + this.uid + ", adname=" + this.adname + ", aduserName=" + this.aduserName + ", adprovince=" + this.adprovince + ", adcity=" + this.adcity + ", adaddress=" + this.adaddress + ", adpostcode=" + this.adpostcode + ", adphone=" + this.adphone + ", admailbox=" + this.admailbox + ", addefault=" + this.addefault + ")";
        }
    }
}
